<template>
    <div>
        <van-nav-bar :title="props.title" v-if="isShow"/>
        <van-nav-bar :title="props.title" v-else left-text="返回" left-arrow @click-left="router.go(-1)" />
    </div>
</template>

<script setup>
import router from '@/router';
import { ref } from 'vue';

const props = defineProps(['title'])
let isShow = ref(true)
if(props.title == '为你推荐' || props.title == '附近门店' || props.title == '登录' || props.title == '孕育' || props.title == '购物车' || props.title == '我的'){
    isShow.value = true
}else{
    isShow.value = false
}

</script>

<style lang="scss" scoped></style>